<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Guide extends Model
{
    protected $table = 'guide';

    protected $primaryKey = 'guideID';

    public $timestamps = false;
    //白名单
    protected $fillable = [
        'guideID',
        'img',
        'note',
        'type',
        'time',
        'id',
        'img_oss',
    ];

    protected $casts = ['img'];

    public function getImgAttribute($value)
    {
        return \App\Library\HandleFile::handleFilePath($value, $this->img_oss);
    }
}
